Week 3 Assignment - k-means Clustering¶
Grad 509: Assignment for k-means clustering
Make sure you can copy and run the code below, obtaining similar results to those presented here. You will need to download the image ladybug.jpg from Brightspace. Once you have successfully run the code, please attempt to answer the questions at the bottom.
In [ ]:
# Read and display an image using Python Imaging Library (PIL)
import PIL
from PIL import Image
import numpy as np
import matplotlib.pyplot as plt
image = PIL.Image.open('ladybug.jpg')
display(image)